<template lang="">
  <a-table :columns="columns" :data-source="list" :loading="loading"></a-table>
</template>
<script setup lang="ts">
import { onMounted, ref, nextTick } from 'vue';
import { getSiteAnnouncementList } from '@/api/message';
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const loading = ref(false);
const columns = reactive([
  {
    key: 'subject',
    dataIndex: 'subject',
    title: t('zhuT'),
    width: 180,
    ellipsis: true,
  },
  {
    key: 'content',
    dataIndex: 'content',
    title: t('neiR'),
    ellipsis: true,
  },
  {
    key: 'statusName',
    dataIndex: 'statusName',
    title: t('zhuan-2'),
    width: 60
  },
  // {
  //   key: 'effective_date',
  //   dataIndex: 'effective_date',
  //   title: '有效时间'
  // },
  {
    key: 'expired_date',
    dataIndex: 'expired_date',
    title: t('guoQ'),
    width: 130
  },
  // {
  //   key: 'action',
  //   title: '操作',
  //   width: 200
  // }
])
const list = ref([]);

const fetchAnnouncementList = () => {
  getSiteAnnouncementList()
  .then((data: any) => {
    list.value = data.rows;
  }).finally(() => {
    loading.value = false;
  })
}

onMounted(() => {
  fetchAnnouncementList()
});

</script>
<style lang="">
  
</style>